<template>
  <div class="c-content-top" v-if="label">
    <div class="left">{{ label }}</div>
    <div class="right">
      <slot name="right"></slot>
    </div>
  </div>
</template>

<script lang="ts">
import { Component, Vue, Prop } from "vue-property-decorator";

@Component({
  name: "CContentTop",
  components: {}
})
export default class CContentTop extends Vue {
  @Prop() label!: string;
}
</script>

<style lang="less" scoped>
@import "~@/assets/style/mixin.less";
.c-content-top {
  .scale(margin-top, 20px);
  .scale(margin-bottom, 20px);
  min-height: 36px;
  overflow: hidden;
  display: flex;
  justify-content: space-between;
  align-items: center;

  .left {
    color: black;
    line-height: 100%;
    font-size: 22px;
    font-weight: bold;
    position: relative;
    padding-left: 11px;
    &::before {
      position: absolute;
      content: "";
      height: 20px;
      width: 4px;
      background-color: #50a1ed;
      left: 0;
      top: 50%;
      transform: translateY(-50%);
    }
  }
}
</style>
